Skip to content

ci: drop archived pytest-pydocstyle; xfail test_xipm_theo (numpy>=2.5)#70

Merged
cailmdaley merged 1 commit into
developfrom
ci/pin-pytest-9.1
Jun 30, 2026
Merged

ci: drop archived pytest-pydocstyle; xfail test_xipm_theo (numpy>=2.5)#70
cailmdaley merged 1 commit into
developfrom
ci/pin-pytest-9.1

Conversation

@cailmdaley

@cailmdaley cailmdaley commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Two pre-existing CI breakages on develop, both dependency drift — neither a source change.

1. pytest-pydocstyle is archived and breaks under pytest 9.1

CI aborted at pytest startup:

PluginValidationError: Plugin 'pydocstyle' for hook 'pytest_collect_file'
... Argument(s) {'path'} are declared in the hookimpl but can not be found in the hookspec

pytest-pydocstyle's pytest_collect_file still declares the legacy path arg that pytest 9.1 removed from the hookspec. The plugin's upstream is archived, so it will never be fixed — remove it rather than pin pytest back. Docstring linting, if wanted, should move to a maintained tool (ruff's pydocstyle D rules), ideally folded into the project-wide ruff effort.

2. test_xipm_theo fails under numpy ≥ 2.5

With pytest running again, test_cosmo.py::test_xipm_theo fails on Python 3.12 (numpy 2.5.0): pyccl 3.3.4 calls float() on a non-0-d array in boltzmann.py:119, which numpy ≥ 2.5 turns into a hard TypeError. 3.10 passes (numpy 2.2.6). xfail it (conditioned on numpy ≥ 2.5, non-strict) as a stopgap.

The real fix — and the broader question of where cosmology code should live (cs_util.cosmo vs sp_validation's inline re-implementation; note cs_util.cosmo is consumed by shear_psf_leakage) — is tracked in #71.

Verified locally: full suite green under latest pytest with the plugin removed; the numpy ≥ 2.5 xfail path exercised.

— Claude on behalf of Cail

Two pre-existing CI breakages, both dependency drift, neither a source bug:

1. pytest-pydocstyle is archived upstream and its pytest_collect_file hook
   still declares the legacy `path` arg that pytest 9.1 removed from the
   hookspec, so pytest aborted at startup with PluginValidationError.
   Since the plugin will never be updated, remove it rather than pin pytest
   back. Docstring linting, if wanted, should move to a maintained tool
   (ruff's pydocstyle `D` rules).

2. With pytest running again, test_cosmo::test_xipm_theo fails on Python
   3.12 (numpy 2.5.0): pyccl 3.3.4 calls float() on a non-0-d array in
   boltzmann.py, which numpy>=2.5 turns into a hard TypeError. xfail it
   (conditioned on numpy>=2.5, non-strict) as a stopgap. The real fix and
   the broader "where should cosmology code live" question are tracked in
   #71.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BXY93SBtDvLLrxWX8Vh4KW
@cailmdaley cailmdaley changed the title ci: pin pytest<9.1 (unbreak CI; pytest-pydocstyle 2.4.0 vs 9.1 hookspec) ci: drop archived pytest-pydocstyle; xfail test_xipm_theo (numpy>=2.5) Jun 30, 2026
@cailmdaley cailmdaley merged commit ff8fa2b into develop Jun 30, 2026
5 checks passed
@cailmdaley cailmdaley deleted the ci/pin-pytest-9.1 branch June 30, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant